import Vue from 'vue'
import Router from 'vue-router'
import Home from '../components/webpage/Home'
import Admin from '../components/admin/Admin'
import MobilePage from '../components/mobilePage/menter'

// import adminIndex from '../components/admin/Index'
import Goods from '../components/admin/goods/GoodsAdd'
import GoodsList from '../components/admin/goods/GoodsList'

Vue.use(Router)

export default new Router({
  linkActiveClass: 'is-active',
  routes: [
    {
      path: '/',
      name: 'home',
      component: Home
    },
    {
      path: '/admin',
      name: 'admin',
      component: Admin,
      children: [
        {
          path: '/admin',
          name: 'admin',
          component: Admin
        },
        {
          path: '/goods',
          name: 'goodsAdd',
          component: Goods
        },
        {
          path: '/goods/list',
          name: 'goodslist',
          component: GoodsList
        }
      ]
    },
    {
      path: '/mp',
      name: 'mp',
      component: MobilePage,
      children: [
        {
          path: '/mp',
          name: 'mp',
          component: MobilePage
        }
      ]
    }
  ]
})
